Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for mentioning RTL names #1639

Merged
merged 1 commit into from
Dec 11, 2015

Conversation

fduraibi
Copy link
Contributor

The current @mention (for user names and channel names) uses the regex \b to detect the name boundaries, however that token doesn't support Unicode characters. This solution replaces the word boundary with a regex that matches end of the word with any of the following white space, colon, comma and dot.

However, ending a name with a dot still has a problem as it doesn't get a mention link and this fix does not fix it. Part of the problem is that dots are allowed in the name validation regex. So this problem need to be solved later.

Another thing that this fix adds is a description to the UTF8 Name Validation settings, to inform chat admins about the characters that they need to avoid using in their regexes to not break other chat functionalities that depends on special characters to denote special meanings.

The current @mention (for user names and channel names) uses the regex `\b` to detect the name boundaries, however that token doesn't support unicode characters. This solution replaces the word boundary with regex that match end of the word with any of the following white space, colon, comma and dot.

However, ending a name with a dot still has a problem as it doesn't get a mention link and this fix does not fix it. Part of the problem is that dots are allowed in the name validation regex. So this problem need to be solved later.

Another thing that this fix adds is a description to the UTF8 Name Validation settings, to inform chat admins about the characters that they need to avoid using in their regexes to not break other chat functionalities that depends on special characters to denote special meanings.
engelgabriel added a commit that referenced this pull request Dec 11, 2015
@engelgabriel engelgabriel merged commit 2d98018 into RocketChat:develop Dec 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants